package com.wisdudu.blank.data.source.remote.service;

import com.wisdudu.blank.data.bean.ImageLoad;
import com.wisdudu.blank.data.source.remote.client.retrofit.subscribers.Abs;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Response;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by qyf on 2016/9/27.
 */

public interface LoadAPI {
    String BASE_URL = "http://api.wisdudu.com:1018/";
    /**
     * 上传图片等
     * 对象待定
     *
     * @param file
     */
    @Multipart
    @POST("upload/upload.html")
    Observable<Abs<ImageLoad>> upload(@Part MultipartBody.Part file);

    /**
     * 上传多个文件图片等
     * 对象待定
     *
     * @param parts
     */
    @Multipart
    @POST("upload/upload.html")
    Observable<Response<ResponseBody>> upload(@Part List<MultipartBody.Part> parts);

    /**
     * 下载广告图片
     */
    @GET
    Call<ResponseBody> downAdImg(@Url String s);
}
